<?php

namespace app\staff\controller;

use app\common\model\ads\Ads;
use app\common\model\ads\Position;
use app\common\model\product\Cases;
use app\common\model\product\Category;
use ba\Tree;
use Throwable;
use think\facade\Db;
use think\facade\Cookie;
use think\facade\Config;
use app\common\controller\Frontend;

class Product extends Frontend
{
    protected array $noNeedLogin = ['index'];

    public function initialize(): void
    {
        parent::initialize();
    }

   public function categorys(){
        $res = Category::select()->toArray();
        $this->success('', $res);
   }

    public function cases(){
        $res = Cases::where([
            'switch' => 1
        ])->select()->toArray();
        $this->success('', $res);
    }
}